<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>预约详情</title>
    <link rel="stylesheet" href="../css/page-health-orderDetail.css" />

    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script>
        var id = getUrlParam("orderId");//根据请求URL中的参数名称获取对应的值(订单id)
        //alert(id);
    // var img = 'http://qfcvez68o.hn-bkt.clouddn.com/'+getUrlParam("img");
    // var setmealName = getUrlParam("setmealName");
    // var memberName = getUrlParam("memberName");
    // var orderDate = getUrlParam("orderDate");
    </script>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app" class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="card">
            <div class="project-img">
                <img :src="'http://qgc6wtosq.hd-bkt.clouddn.com/'+ this.healthIntervention.img" width="100%" height="100%" />
            </div>
            <div class="project-text">
                <h4 class="tit">{{healthIntervention.setmealName}}</h4>
            <br/>
                <p class="subtit">体检人：{{healthIntervention.memberName}}</p>
                <p class="subtit">体检日期：{{healthIntervention.orderDate | dateForMate}}</p>

            </div>
        </div>
        <div class="table-listbox">
            <div class="box-title">
                <i class="icon-zhen"><span class="path1"></span><span class="path2"></span></i>
                <span>健康师建议及治疗方案</span>
            </div>
            <div class="box-table">
<!--                <div class="table-title">-->
<!--                    <div class="tit-item flex2">项目名称</div>-->
<!--                    <div class="tit-item  flex3">项目内容</div>-->
<!--                    <div class="tit-item  flex3">项目解读</div>-->
<!--                </div>-->
                <div class="table-content">
                    <ul class="table-list">
                        <li class="table-item" >
                            <div class="item flex2">健康师姓名</div>
                            <div class="item flex3">
                                <label >
                                    {{healthIntervention.doctorName}}
                                </label>
                            </div>
                        </li>
                        <li class="table-item" >
                            <div class="item flex2">健康师意见</div>
                            <div class="item flex3">
                                <label >
                                    {{healthIntervention.doctorAdvice}}
                                </label>
                            </div>
                        </li>
                        <li class="table-item" >
                            <div class="item flex2">建议运动</div>
                            <div class="item flex3">
                                <label  v-for="exercise in healthIntervention.exercises">
                                    {{exercise}}<br/><br/>
                                </label>
                            </div>
                        </li>
                        <li class="table-item" >
                            <div class="item flex2">建议膳食</div>
                            <div class="item flex3">
                                <label  v-for="meal in healthIntervention.meals">
                                    {{meal.name}}({{meal.explain}})<br/><br/>
                                </label>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="box-button">
                    <a @click="toOrderInfo()" class="order-btn">去点评一下吧</a>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/plugins/l2dwidget.min.js"></script>
<script>
    Vue.filter('dateForMate', function (date) {
        // console.info(date);
        // console.info(new Date());

        return date.substring(0,10);
    });
    var vue = new Vue({
        el:'#app',
        data:{
            imgUrl:null,//套餐对应的图片链接
            //健康干预信息
            healthIntervention:{
                img:"",
                setmealName:"",
                memberName:"",
                orderDate:"",
                doctorName:"",
                doctorAdvice:"",
                //建议运动
                exercises:[],
                //建议膳食
                meals:[]
            },
        },
        methods:{
            toOrderInfo(){
                window.location.href = "/pages/health-intervention-orderList.html";
            }
        },
        mounted(){
            //发送ajax请求，根据套餐ID查询套餐详细信息（包括套餐基本信息、套餐包含的检查组、检查组包含的检查项,健康干预师建议,姓名和建议运动）
            axios.post("/healthIntervention/findHealthInterventionByOrderId.do?orderId=" + id).then((response) => {
                if(response.data.flag){
                    this.healthIntervention = response.data.data;
                    this.imgUrl = 'http://qfc7ves7q.hn-bkt.clouddn.com/' + this.healthIntervention.img;
                }else {
                    this.$message.error(response.data.message)
                }
            });
        }
    });
    var config = {
        model: {
            jsonPath: '{"version":"Sample 1.0.0","model":"moc/hijiki.moc","textures":["moc/hijiki.2048/texture_00.png"],"name":"hijiki","pose":"hijiki.pose.json","motions":{"idle":[{"file":"mtn/00_idle.mtn"}],"":[{"file":"mtn/01.mtn"},{"file":"mtn/02.mtn"},{"file":"mtn/03.mtn"},{"file":"mtn/04.mtn"},{"file":"mtn/05.mtn"},{"file":"mtn/06.mtn"},{"file":"mtn/07.mtn"},{"file":"mtn/08.mtn"}]}}',
        },
        display: {
            superSample: 1,
            width: 245,
            height: 245,
            position: 'right',
            hOffset: 0,
            vOffset: 0,
        },
        mobile: {
            show: false,
            scale: 1,
            motion: false,
        },
        react: {
            opacityDefault: 1,
            opacityOnHover: 0.75
        }
    };
    L2Dwidget.init(config);
</script>

<!--<script type="text/javascript">-->

<!--</script>-->
</body>